import config from "@/config"
import http from "@/utils/request"

export default {
    process:{
        add:{
            url: `${config.API_URL}/main/flowable/process/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/flowable/process/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        saveBaseInfo: {
            url: `${config.API_URL}/main/flowable/process/saveBaseInfo`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, { headers: { 'Content-Type': 'multipart/form-data' } });
            }
        },
        updateBaseInfo: {
            url: `${config.API_URL}/main/flowable/process/updateBaseInfo`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, { headers: { 'Content-Type': 'multipart/form-data' } });
            }
        },
        deptTree: {
            url: `${config.API_URL}/core/reportCoreService/query`,
            name: "部门信息树状图",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        saveFlow: {
            url: `${config.API_URL}/main/flowable/process/saveFlow`,
            name: "部门信息树状图",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
    },
    task:{
        queryTask:{
            url: `${config.API_URL}/main/flowable/task/queryTask`,
            name: "审核信息",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        doStartWorkFlow:{
            url: `${config.API_URL}/main/flowable/processInstance/doStartWorkFlow`,
            name: "审核信息",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        
        nodeList:{
            url: `${config.API_URL}/main/flowable/processInstance/formatStartNodeShow`,
            name: "时间线信息",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        complete:{
            url: `${config.API_URL}/main/flowable/task/completeTask`,
            name: "审核",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, { headers: { 'Content-Type': 'multipart/form-data' } });
            }
        },
        image:{
            url: `${config.API_URL}/main/flowable/processInstance/showProcessInstanceImg`,
            name: "流程图",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail:{
            url: `${config.API_URL}/main/flowable/processInstance/detail`,
            name: "审核详情",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        countBizItemData:{
            url: `${config.API_URL}/core/system/home/countBizItemData`,
            name: "任务数",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        
        
        
    }
    
}